package tech.aistar.corejava.day17.reflection.factory;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * Created by 豆梦寒 on 2019/8/6.
 */
public class PropUtils {
    private static Properties prop = new Properties();

    static {
        InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream("tech/aistar/corejava/day17/reflection/factory/beanFactory.properties");
        try {
            prop.load(in);
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
    public static String getValue(String key){
        return prop.getProperty(key);
    }
}
